﻿<common:LayoutAwarePage
    x:Name="pageRoot"
    x:Class="Measurement.SettingsFlyouts.LinkedIn"
    DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Measurement.SettingsFlyouts"
    xmlns:common="using:Measurement.Common"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" Width="360">

    <Page.Resources>

        <!-- TODO: Delete this line if the key AppName is declared in App.xaml -->
        <x:String x:Key="AppName">login to linkedin</x:String>
    </Page.Resources>

    <!--
        This grid acts as a root panel for the page that defines two rows:
        * Row 0 contains the back button and page title
        * Row 1 contains the rest of the page layout
    -->
    <Grid Style="{StaticResource LayoutRootStyle}" Background="#FFe9e6e1">

        <Grid.RowDefinitions>
            <RowDefinition Height="140"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="1" Margin="40,0,0,0">
            <TextBlock Text="username" Foreground="#FF44372f" FontSize="24" FontWeight="Light"/>
            <TextBox Width="300" Height="40" HorizontalAlignment="Left" Margin="0,10" Background="#FF6d635c" BorderBrush="#FF6d635c" Text="enter username" Foreground="White" FontWeight="Light" FontSize="18"/>

            <TextBlock Text="password" Foreground="#FF44372f" FontSize="24" FontWeight="Light"/>
            <PasswordBox Width="300" Height="40" HorizontalAlignment="Left" Margin="0,10" Background="#FF6d635c" BorderBrush="#FF6d635c" Foreground="White" FontWeight="Light" FontSize="18"/>

            <Button Style="{StaticResource FlyoutSubmitBtnStyle}" Click="Button_Click_1" Width="125" Height="40" Margin="0,30" BorderBrush="#FF44372f" Background="#FF44372f" Content="Submit" HorizontalAlignment="Left"/>
        </StackPanel>

        <!-- Back button and page title -->
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <StackPanel Orientation="Horizontal" Grid.Column="1" Margin="30,0,0,0">
                <Button Tag="{StaticResource LinkedIn}" Foreground="#FF006695" Height="50" VerticalAlignment="Center" Margin="0,36,20,0" Style="{StaticResource SocialBtnStyle}" Width="50" IsEnabled="False"/>
                <TextBlock x:Name="pageTitle" Grid.Column="1" Text="{StaticResource AppName}" Style="{StaticResource PageHeaderTextStyle}" Foreground="#FF44372f" FontSize="30" FontWeight="SemiBold"/>
            </StackPanel>
        </Grid>

        <VisualStateManager.VisualStateGroups>

            <!-- Visual states reflect the application's view state -->
            <VisualStateGroup x:Name="ApplicationViewStates">
                <VisualState x:Name="FullScreenLandscape"/>
                <VisualState x:Name="Filled"/>

                <!-- The entire page respects the narrower 100-pixel margin convention for portrait -->
                <VisualState x:Name="FullScreenPortrait">
                    <Storyboard>                       
                    </Storyboard>
                </VisualState>

                <!-- The back button and title have different styles when snapped -->
                <VisualState x:Name="Snapped">
                    <Storyboard>
                       
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="pageTitle" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedPageHeaderTextStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
    </Grid>
</common:LayoutAwarePage>
